<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="app">
        <ol>
            <li v-for="val in arr">
                {{val}}
            </li>
        </ol>
        <ul>
            <li v-for="(val,index) in arr">
                {{index}}---{{val}}
            </li>
        </ul>
        <ol>
            <li v-for="(item,pro) in obj">
                {{pro}}---{{item}}
            </li>
        </ol>
        <input type="text" v-model="val">
        <h3>{{changed}}</h3>
    </div>
</body>
<script>

    var app = new Vue({
        el:"#app",
        data:function () {
            return {
                arr:["A","B","C"],
                obj:{
                    name:"zhangsan",
                    sex:"nan",
                    age:12
                },
                val:""
            };
        },
        methods:{},
        computed:{
            changed:function () {
                return this.val+Date.now();
            }
        }
    });

</script>
</html>










